package com.jt.service;

import com.jt.anno.Cache;
import org.springframework.stereotype.Service;

@Service
public class DeptServiceImpl implements DeptService{

    @Override
    public void addDept() {
        System.out.println("添加部门信息");
    }

    @Override
    @Cache //标识自定义注解
    public void updateDept() {
        System.out.println("更新部门");
    }

    @Override
    @Cache
    public String after(Integer id) {
        return "Spring通知的测试";
    }

    @Override
    @Cache
    public void afterThrow() {
        int a=1/0;
    }

    @Override
    @Cache    //标识执行AOP中的方法
    public void doAround() {
        System.out.println("实现用户数据的入库操作");
    }

    @Override
    @Cache
    public void doOrder() {
        System.out.println("测试程序执行的顺序");
    }
}
